#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<pair<int,int>> vpii;
typedef pair<int,int> pii;
#define mp(x,y) make_pair((x),(y))

bool isprime(int n){
    if(n<=1)return false;
    int sqr=(int)sqrt(n*1.0);
    for(int i=2;i<=sqr;i++){
        if(n%i==0){return false;}
    }
    return true;
}

int main(){
    //freopen("in.txt","r",stdin);
    ll inp;
    vpii ans;
    pii tmp;
    cin>>inp;
 		if(inp==1){cout<<"1=1"<<endl;return 0;}
    ll num=inp;
    int i=2,cnt=1;
    while(inp!=1){
        if(!isprime(i) || inp%(long long)pow(i,cnt)!=0){i++;continue;}
        while(inp%(long long)pow(i,cnt)==0){
            tmp=make_pair(i,cnt++);
        }
        ans.push_back(tmp);
        cnt=1;inp=inp/pow(tmp.first,tmp.second);
        i++;
    }
    cout<<num<<"="<<ans[0].first;
    if(ans[0].second!=1){printf("^%d",ans[0].second);}
    for(int i=1;i<ans.size();i++){
        printf("*%d",ans[i].first);
        if(ans[i].second!=1){printf("^%d",ans[i].second);}
    }
    return 0;
}
